package com.xwtec.juc.c_003;

/**
 * synchronized关键字
 * 对某个对象上锁
 *
 * @Author: zt
 * @Date: 2021/3/19 15:16
 */
public class T {
    private int count = 10;
    private Object o = new Object();

    public synchronized void m() {
            count--;
            System.out.println(Thread.currentThread().getName() + "count=" + count);


    }
}